package com.liang.demo1.controller;

import com.liang.demo1.domain.Account;
import com.liang.demo1.service.AccountService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/account")
public class AccountController {

    @Resource
    AccountService service;


    @GetMapping("/get/{id}")
    public void get(@PathVariable String id){
        Account account = service.getAccount(id);
        System.out.println(account);
    }


    @PostMapping("/save")
    public void save(){
       service.save();
       System.out.println();
    }


}
